<?php

/**
 * security actions.
 *
 * @package    sf_imacom
 * @subpackage security
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
 */
class securityActions extends sfActions
{
  /**
   * Executes index action
   *
   */
  public function executeIndex()
  {
  }

  public function executeLogin()
  {

  if ($this->getRequestParameter('login') == 'admin' && $this->getRequestParameter('password') == 'password')
  {
    $this->getUser()->setAuthenticated(true);

    return $this->redirect('stage/index');
  }
  else
  {
    $this->getRequest()->setError('login', 'incorrect entry');

    return $this->forward('security', 'index');
  }
}

}
